package demo7;

public class Main {
    public static void main(String[] args) throws chekeageexception {
            checkage(34);
    }


    public static void checkage(int age) throws chekeageexception{
        if(age<0||age>200){
            throw new chekeageexception("年龄不合法");
        }else{
            System.out.println("年龄合法");
        }
    }
}
